<?php
session_start();
require_once('config/config.php');
/* connessione al db */
$mysqli = new mysqli($_CFG[connect][host], $_CFG[connect][user], $_CFG[connect][pass], $_CFG[connect][database]);

/* check connection */
if (mysqli_connect_errno()) {
    printf("Connect failed: %s\n", mysqli_connect_error());
    exit();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it" lang="it" dir="ltr">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>phPOS - Point of Sales - www.cospa.biz</title>
    <link rel="stylesheet" href="style/main.css" type="text/css" media="screen" />
	<!--<script src="http://code.jquery.com/jquery-latest.js"></script>-->
	<script type="text/javascript" src="script/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="script/main.js"></script>
	
	<script type="text/javascript" src="./fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
	<script type="text/javascript" src="./fancybox/jquery.fancybox-1.3.4.pack.js"></script>
	<link rel="stylesheet" type="text/css" href="./fancybox/jquery.fancybox-1.3.4.css" media="screen" />

<!-- https://github.com/iamnoah/writeCapture -->
	<script type="text/javascript" src="script/writeCapture-1.0.5.js"></script>
	
<!-- FBBorderLayout - a jQuery "border layout" -->
	<!-- <script src="http://code.jquery.com/ui/1.8.18/jquery-ui.js"></script> -->
	<script type="text/javascript" src="script/jquery-ui/js/jquery-ui-1.8.21.custom.min.js"></script>
	<script type="text/javascript" src="script/fbborderlayout.js"></script>
	<script type="text/javascript">
	$(function () {
		$("body").FBBorderLayout({
			spacing: 5,
			north_resizable: true,
			north_max_height: 100,
			east_resizable: true,
			east_width: 400,
			east_min_width:300,
			east_max_width:500,
			south_resizable: true,
			south_max_height: 100,
			west_resizable: true,
			west_width: 250,
			west_min_width:200,
			west_max_width:300
		});
	});

	</script>
<!-- /FBBorderLayout -->
</head>
<body>
<div class="fbbl_north">
<?php include_once('tabmenu.inc.php'); ?>
	<div id="menu">
<?php include_once('menu.inc.php'); ?>	
	</div>
</div>

<div class="fbbl_west">
	<div id="categorie">
<?php include_once('categorie.inc.php'); ?>
	</div>
</div>

<div class="fbbl_east">
	<div id="cassa">
<?php
	//$_SESSION['cart'][$_CFG[pos][default_coperto]]=1;
	include_once('cassa.inc.php'); 
?>
	</div>

</div>

<div class="fbbl_south">
	<div id="loadingbar" class="footerbar"><img src="images/ajax-loader.gif" alt="preloader..." /></div>
</div>

<div class="fbbl_center">
	<div id="prodotti" class="clear">
<?php include_once('prodotti.inc.php'); ?>
	</div>
</div>
<script type="text/javascript" src="script/events.js"></script>
</body>
</html>
<?php
/* close connection */
$mysqli->close();
?>